package nothing.dao.hibernate;

import nothing.model.RecipeStep;
import nothing.dao.RecipeStepDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class RecipeStepDaoHibernate extends GenericDaoHibernate<RecipeStep, Long> implements RecipeStepDao {

    public RecipeStepDaoHibernate() {
        super(RecipeStep.class);
    }

    public List<RecipeStep> findByRecipeName(String name) {
        return getHibernateTemplate().find("from RecipeStep rs , Recipe r where rs.recipe = r and r.name=?", name);
    }
}


